﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public class CTPhieuNhapBUS
    {
        public List<CTPhieuNhapDTO> LayCTPhieuNhap(int maPN)
        {
            CTPhieuNhapDAO dao = new CTPhieuNhapDAO();
            return dao.LayCTPhieuNhap(maPN);
        }


        public List<CTPhieuNhapDTO> LayChiTiet(int maPN, int maSP)
        {
            CTPhieuNhapDAO dao = new CTPhieuNhapDAO();
            return dao.LayChiTiet(maPN, maSP);
        }

        public int ThemChiTiet(CTPhieuNhapDTO ctDTO)
        {
            CTPhieuNhapDAO dao = new CTPhieuNhapDAO();
            return dao.ThemChiTiet(ctDTO);
        }

        public int XoaChiTiet(int maPN)
        {
            CTPhieuNhapDAO dao = new CTPhieuNhapDAO();
            return dao.XoaChiTiet(maPN);
        }

        public int LaySoLuongSPDaNhap(int maPN, int maSP)
        {
            CTPhieuNhapDAO dao = new CTPhieuNhapDAO();
            return dao.LaySoLuongSPDaNhap(maPN, maSP);
        }
    }
}
